package com.org.dao;

import com.org.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    public List<User> getUser();

    @Insert("insert into user values(#{id},#{name},#{pwd})")
    public boolean insertUser(User user);

    @Update("update user set pwd = #{pwd} where id = #{id}")
    public boolean updatePwd(@Param("id") int id,@Param("pwd") String pwd);

    @Delete("delete from user where id = #{id}")
    public boolean deleteById(@Param("id") int id);
}
